package main

import (
	"container/list"
	"fmt"
)

func main() {

	n1, n2, n3, n4 := new(list.Element), new(list.Element), new(list.Element), new(list.Element)
	n1.Value = 1
	n2.Value = 2
	n3.Value = 3
	n4.Value = 4

	l := list.New()
	l.PushBack(n1)
	l.PushBack(n2)
	l.PushBack(n3)
	l.PushBack(n4)

	fmt.Println(l.Len())

	fmt.Println(l.Front().Next().Value.(*list.Element).Value)

	/*
		这是官方链表的使用法，可以参考官方文档
	*/

}
